/*
 *  DbExchangeTableEntry.h
 *  StrategyInspector
 *
 *  Created by jiro on 12/08/07.
 *  Copyright 2012 jiro music. All rights reserved.
 *
 */

#pragma once

#include "DbTableEntry.h"
#import "../DbConstants.h"
#include <vector>
#include <string>

class DbExchangeTableEntry : public DbTableEntry
{
public:

	DbExchangeTableEntry();

	DbExchangeTableEntry( const std::vector< const char* >& values );
	
	~DbExchangeTableEntry();

	static double getVolatilityOf( const std::vector< DbExchangeTableEntry >& exchangeEntries, PriceField::Type type );

	double getPrice( PriceField::Type type ) const;

	double getPriceWidth() const;

	double getOpenPrice() const;

	double getClosePrice() const;

	double getHighPrice() const;

	double getLowPrice() const;

	NSString* queryInsertValue() const;

	NSString* queryInsert() const;

protected:

	NSString* code;

	NSDate*	exchangeDate;

	double	openPrice;
	
	double	closePrice;

	double	highPrice;

	double	lowPrice;

};
